Skip to content

Update disclaimer to improve clarity and intent #15296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Update disclaimer to improve clarity and intent #15296

wants to merge 1 commit into from

Conversation

hugo
Copy link
Contributor

@hugo hugo commented Jul 1, 2014

No description provided.

@alexcrichton
Copy link
Member

cc @steveklabnik

@steveklabnik
Copy link
Member

What I'd really prefer is a better example, but I don't mind changing this to say that if you feel it's better.

@hugo
Copy link
Contributor Author

hugo commented Jul 1, 2014

I prefer my phrasing, but it's just that: a preference.

I've spent an hour trying to formulate a better example, but can't think of one. The real-world examples I can find where dangling pointers actually caused problems are all far too subtle or complex for an intro. Which is kind of the point being made, ironically.

@kud1ing
Copy link

kud1ing commented Jul 2, 2014

I slightly prefer the new version.

@kud1ing
Copy link

kud1ing commented Jul 2, 2014

Regarding a better example: how about returning a const reference to a container-member, then modifying the container and then trying to use the dangling reference? That feels less contrived and using const references opposed to pointers is nearer to best practise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants